package Geometry;

import android.graphics.Canvas;
import android.graphics.PointF;

public abstract class Picture {
	
	private int drawColor;
	private PointF basePoint;
	
	public Picture(int drawColor, PointF basePoint) {
		super();
		this.drawColor = drawColor;
		this.basePoint = basePoint;
	}
	
	public Picture() {
		
	}

	public int getDrawColor() {
		return drawColor;
	}

	public void setDrawColor(int drawColor) {
		this.drawColor = drawColor;
	}

	public PointF getBasePoint() {
		return basePoint;
	}

	public void setBasePoint(PointF basePoint) {
		this.basePoint = basePoint;
	}
	
	public abstract void draw(Canvas canv);
	
	/**
	 * Move the position of the picture by the increments (dx,dy).
	 */
	public void move(float dx, float dy) {
		basePoint.x += dx;
		basePoint.y += dy;
		
	}
	
	/**
	 * Test if the point (x,y) is inside this picture.
	 * 
	 * @return  Return true if (x,y) is inside this picture,
	 * 		return false if it is not inside this picture.
	 */
	public abstract boolean isInside(float x, float y);
}
